package day9;

public class D9_1 {
    public static void main(String[] args) {
        Dog dog=new Dog();
        dog.eat();
        dog.KeepHome();
        Cat cat=new Cat();
        cat.eat();
        cat.CatchMouse();
    }
}
 class Animal{
    public void eat(){

    }
}
class Dog extends Animal{
    @Override
    public void eat() {
        System.out.println("狗啃骨头...");
    }
    public void KeepHome(){
        System.out.println("狗会看家....");
    }
}
class Cat extends Animal{
    @Override
    public void eat() {
        System.out.println("猫吃鱼....");
    }
    public void CatchMouse(){
        System.out.println("猫会抓老鼠.....");
    }
}